
clear
set more off

cd ""


use "data/f.dta", clear
merge 1:1 iso year using "data/gdpdata.dta"
drop if _merge == 2 
drop _merge

*** real gdp growth
tsset iso_num year
sort iso_num year

by iso_num: gen grgdppc = (rgdppc / L.rgdppc - 1)*100 
qui gen rcredit_loan = tloans/cpi
by iso_num: gen credit_growth = (rcredit_loan/ L.rcredit_loan - 1)*100
qui gen change_finsent = score - L.score

** in %
replace score = 100*score
replace change_finsent = 100*change_finsent

* summary
by iso_num: summarize score change_finsent grgdppc credit_growth
summarize score change_finsent grgdppc credit_growth



